{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pregnants</th>\n",
       "      <th>Plasma_glucose_concentration</th>\n",
       "      <th>blood_pressure</th>\n",
       "      <th>Triceps_skin_fold_thickness</th>\n",
       "      <th>serum_insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>Diabetes_pedigree_function</th>\n",
       "      <th>Age</th>\n",
       "      <th>Target</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.639947</td>\n",
       "      <td>0.866045</td>\n",
       "      <td>-0.031990</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>0.166619</td>\n",
       "      <td>0.468492</td>\n",
       "      <td>1.425995</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.205066</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-0.852200</td>\n",
       "      <td>-0.365061</td>\n",
       "      <td>-0.190672</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.233880</td>\n",
       "      <td>2.016662</td>\n",
       "      <td>-0.693761</td>\n",
       "      <td>-0.012301</td>\n",
       "      <td>-0.181541</td>\n",
       "      <td>-1.332500</td>\n",
       "      <td>0.604397</td>\n",
       "      <td>-0.105584</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.844885</td>\n",
       "      <td>-1.073567</td>\n",
       "      <td>-0.528319</td>\n",
       "      <td>-0.695245</td>\n",
       "      <td>-0.540642</td>\n",
       "      <td>-0.633881</td>\n",
       "      <td>-0.920763</td>\n",
       "      <td>-1.041549</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.141852</td>\n",
       "      <td>0.504422</td>\n",
       "      <td>-2.679076</td>\n",
       "      <td>0.670643</td>\n",
       "      <td>0.316566</td>\n",
       "      <td>1.549303</td>\n",
       "      <td>5.484909</td>\n",
       "      <td>-0.020496</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   pregnants  Plasma_glucose_concentration  blood_pressure  \\\n",
       "0   0.639947                      0.866045       -0.031990   \n",
       "1  -0.844885                     -1.205066       -0.528319   \n",
       "2   1.233880                      2.016662       -0.693761   \n",
       "3  -0.844885                     -1.073567       -0.528319   \n",
       "4  -1.141852                      0.504422       -2.679076   \n",
       "\n",
       "   Triceps_skin_fold_thickness  serum_insulin       BMI  \\\n",
       "0                     0.670643      -0.181541  0.166619   \n",
       "1                    -0.012301      -0.181541 -0.852200   \n",
       "2                    -0.012301      -0.181541 -1.332500   \n",
       "3                    -0.695245      -0.540642 -0.633881   \n",
       "4                     0.670643       0.316566  1.549303   \n",
       "\n",
       "   Diabetes_pedigree_function       Age  Target  \n",
       "0                    0.468492  1.425995       1  \n",
       "1                   -0.365061 -0.190672       0  \n",
       "2                    0.604397 -0.105584       1  \n",
       "3                   -0.920763 -1.041549       0  \n",
       "4                    5.484909 -0.020496       1  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#采用5折交叉验证，分别用log似然损失和正确率，对Logistic回归模型的正则超参数调优\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.model_selection import cross_val_score\n",
    "\n",
    "train=pd.read_csv('C:/Users/123/Desktop/Diabets/FE_pima-indians-diabetes.csv')\n",
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train=train['Target']\n",
    "X_train=train.drop(['Target'],axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "logloss of each fold is:  [0.4954799  0.50035386 0.44147359]\n",
      "cv logloss is:  0.4791024465409764\n"
     ]
    }
   ],
   "source": [
    "#默认参数的Logistic回归\n",
    "lr=LogisticRegression()\n",
    "#交叉验证用于评估模型性能和进行参数调优（模型选择）\n",
    "#分类任务中交叉验证缺省是采用StratifiedKFold\n",
    "#数据集比较大，采用3折交叉验证\n",
    "loss=cross_val_score(lr, X_train, y_train, cv=3,scoring='neg_log_loss')\n",
    "#%timeit loss_sparse = cross_val_score(lr, X_train, y_train, cv=3, scoring='neg_log_loss')\n",
    "print('logloss of each fold is: ',-loss)\n",
    "print('cv logloss is: ', -loss.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "#Logistic回归+GridSearchCV\n",
    "#需要调优的参数\n",
    "#请尝试将L1正则和L2正则分开，并配合合适的优化求解算法（solver）\n",
    "#tuned_parameters={'penalty':['l1','l2'],'C':[0.001,0.01,0.1,1,10,100,1000]}\n",
    "penaltys=['l1','l2']\n",
    "Cs=[0.001,0.01,0.1,1,10,100,1000]\n",
    "tuned_parameters=dict(penalty=penaltys,C=Cs)\n",
    "lr_penalty=LogisticRegression()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.4760256746196327\n",
      "{'C': 1, 'penalty': 'l1'}\n"
     ]
    }
   ],
   "source": [
    "#用log似然损失对Logistic回归模型的正则超参数调优\n",
    "grid1=GridSearchCV(lr_penalty,tuned_parameters,cv=5,scoring='neg_log_loss')\n",
    "grid1.fit(X_train,y_train)\n",
    "#examine the best model\n",
    "print(-grid1.best_score_)\n",
    "print(grid1.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\123\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Users\\123\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl4VOXZx/HvPVlIgLCHNSQggrKDRAhudYW41H1Bgap9rdVq7WqrrdW6VG37vq2txRa1WqsoUrdSN0TFqihLQBZZVESRsAiy79nu948ZMMbATJbhZCa/z3WdK3POec7M7xCdO2d7HnN3REREDiQUdAAREWn4VCxERCQqFQsREYlKxUJERKJSsRARkahULEREJCoVC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DPrWWn2TGBpUFnqyswKgZ8DZ7r7zqDzNGKzgZ5m1t3M0oFRwOSAMzV6kYvCfweWuPsfgs5TF2aWvfduRzPLBE4mTt9duhsqwsyeBg4jfOfNCuAqd18VbKraMbNlQBNgQ2TRjAS+s+sc4F4gG9gMzHP3kcGmip2ZnQbcA6QAD7n7bwKOVGtm9gRwPOEeTj8HbnH3vwcaqhbM7BjgLWAh4f/fAX7h7i8Gl6p2zGwA8Ajh/75CwCR3vy0un6ViISIi0eg0lIiIRKViISIiUalYiIhIVCoWIiISlYqFiIhEpWIhUgNmtj16qwNu/5SZHRJ53dzMxpvZx5EeQ980s2Fmlh553agempWGTcVC5CAxs75Airsvjyx6kHDHfD3dvS9wGdAu0unga8BFgQQVqYaKhUgtWNjvI31YLTSziyLLQ2Z2X+RI4Xkze9HMzo9sNhr4d6RdD2AYcJO7VwBEeqd9IdL2uUh7kQZBh7kitXMuMAgYSPiJ5tlm9iZwNNAN6A+0J9z99UORbY4Gnoi87kv4afTy/bz/+8CRcUkuUgs6shCpnWOAJyI9fn4O/Jfwl/sxwL/cvcLd1wLTKm3TCVgfy5tHikhJZHAekcCpWIjUTnXdjx9oOcAuICPyehEw0MwO9P9gE2B3LbKJ1DsVC5HaeRO4KDLwTDZwHDCL8LCW50WuXXQg3PHeXkuAQwHc/WOgCLg10gsqZtZz7xgeZtYWWO/upQdrh0QORMVCpHaeBRYA84HXgZ9FTjs9TXgci/cJjxs+E9gS2eYFvlo8rgA6AsvMbCHwAF+Od3ECkHC9oEryUq+zIvXMzJq7+/bI0cEs4Gh3XxsZb2BaZH5/F7b3vsczwI0JPP64JBndDSVS/56PDEiTDtweOeLA3XeZ2S2Ex+H+bH8bRwZKek6FQhoSHVmIiEhUumYhIiJRqViIiEhUKhYiIhKVioWIiESlYiEiIlGpWIiISFT/D6X9d5lG0vFaAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#plot CV误差曲线\n",
    "test_means=grid1.cv_results_['mean_test_score']\n",
    "test_stds=grid1.cv_results_['std_test_score']\n",
    "train_means=grid1.cv_results_['mean_train_score']\n",
    "train_stds=grid1.cv_results_['std_train_score']\n",
    "#plot results\n",
    "n_Cs=len(Cs)\n",
    "number_penaltys=len(penaltys)\n",
    "test_scores=np.array(test_means).reshape(n_Cs,number_penaltys)\n",
    "train_scores=np.array(train_means).reshape(n_Cs,number_penaltys)\n",
    "test_stds=np.array(test_stds).reshape(n_Cs,number_penaltys)\n",
    "train_stds=np.array(train_stds).reshape(n_Cs,number_penaltys)\n",
    "x_axis=np.log10(Cs)\n",
    "for i,value in enumerate(penaltys):\n",
    "    #pyplot.plot(log(Cs),test_scores[i],label='penalty:',+str(value))\n",
    "    plt.errorbar(x_axis, -test_scores[:,i], yerr=test_stds[:,i], label=penaltys[i] +' Test')\n",
    "    #plt.errorbar(x_axis, -test_scores[:,i], yerr=train_stds[:,i], label=penaltys[i] +' Train')\n",
    "    \n",
    "plt.legend()\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('logloss')\n",
    "plt.savefig('LogisticGridSearchCV_C.png')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7747395833333334\n",
      "{'C': 0.1, 'penalty': 'l2'}\n"
     ]
    }
   ],
   "source": [
    "#用正确率对Logistic回归模型的正则超参数调优,scoring默认为正确率\n",
    "grid2=GridSearchCV(lr_penalty,tuned_parameters,cv=5)\n",
    "grid2.fit(X_train,y_train)\n",
    "#examine the best model\n",
    "print(grid2.best_score_)\n",
    "print(grid2.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\123\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Users\\123\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZQAAAEKCAYAAAA1qaOTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8FeXZ//HPlQXCDoEAYTMsUSAEUBCx7gpK0QoKVH1apYu17WN/trbiUq1rVVrs8nQXqVb7+LiBCAoqiAtqFURl30UEJCyCbLIn1++PGTBgCCfhnMw5yff9ek3nzMw951xj23yde2buMXdHRETkWKVFXYCIiFQPChQREYkLBYqIiMSFAkVEROJCgSIiInGhQBERkbhQoIiISFwoUEREJC4UKCIiEhcZURdQlZo1a+Z5eXlRlyEiklLef//9z9w952jtalSg5OXlMWvWrKjLEBFJKWb2SSzt1OUlIiJxoUAREZG4UKCIiEhc1KhrKCIiB+zbt481a9awe/fuqEtJGllZWbRp04bMzMxK7a9AEZEaac2aNTRo0IC8vDzMLOpyIufubNq0iTVr1tC+fftKfYe6vESkRtq9ezdNmzZVmITMjKZNmx7TGZsCRURqLIXJoY71n4cCRUQkRpc9+A6XPfhO1GUkLQVKDPQ/IhFJhPr16x/8PGDAABo3bsxFF11UZttrr72Wnj170rVrV+rUqUPPnj3p2bMnY8eOrdBvfvDBB7z00kvHVPeR6KK8iEgSGDFiBDt37uTBBx8sc/tf//pXAFauXMlFF13E7NmzK/U7H3zwAfPn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OXBa+3CgHOBOYSfAK1iHhtZQWBIMpHrAI6ATg7h8Bs4C7wtFvMbP8A++AMbOmwEZ331dVByRyNAoUkcQYD8wF5gCvAjeGXVzjCN6BMh94kOBNgFvDfSZxaMBcDbQElpvZPOAhvnxXyjlAyo1+K9WbRhsWqWJmVt/dd4RnGTOB09x9Xfi+itfC5SNdjD/wHc8Ct7j7kiooWSQmustLpOq9EL70qBZwT3jmgrvvMrM7CN4pv+pIO4cv4npOYSLJRmcoIiISF7qGIiIicaFAERGRuFCgiIhIXChQREQkLhQoIiISFwoUERGJi/8PnFEeApMSaRgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#plot CV误差曲线\n",
    "test_means=grid2.cv_results_['mean_test_score']\n",
    "test_stds=grid2.cv_results_['std_test_score']\n",
    "train_means=grid2.cv_results_['mean_train_score']\n",
    "train_stds=grid2.cv_results_['std_train_score']\n",
    "#plot results\n",
    "n_Cs=len(Cs)\n",
    "number_penaltys=len(penaltys)\n",
    "test_scores=np.array(test_means).reshape(n_Cs,number_penaltys)\n",
    "train_scores=np.array(train_means).reshape(n_Cs,number_penaltys)\n",
    "test_stds=np.array(test_stds).reshape(n_Cs,number_penaltys)\n",
    "train_stds=np.array(train_stds).reshape(n_Cs,number_penaltys)\n",
    "x_axis=np.log10(Cs)\n",
    "for i,value in enumerate(penaltys):\n",
    "    #pyplot.plot(log(Cs),test_scores[i],label='penalty:',+str(value))\n",
    "    plt.errorbar(x_axis, -test_scores[:,i], yerr=test_stds[:,i], label=penaltys[i] +' Test')\n",
    "    #plt.errorbar(x_axis, -test_scores[:,i], yerr=train_stds[:,i], label=penaltys[i] +' Train')\n",
    "    \n",
    "plt.legend()\n",
    "plt.xlabel('log(C)')\n",
    "plt.ylabel('logloss')\n",
    "plt.savefig('LogisticGridSearchCV_C.png')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
